package com.gnerv.business.platform.common.dhtmlx;

import com.alibaba.fastjson.JSON;

import java.util.ArrayList;
import java.util.List;

/**
 * @description: DX-tree
 * @author: Gnerv LiGen
 * @date: 2018-07-08
 **/
public class DhtmlxTree {
    /**
     * 节点ID
     */
    private String id;
    /**
     * 上级节点ID
     */
    private String pId;
    /**
     * 显示节点文本
     */
    private String text;
    /**
     * 是否自动展开节点
     */
    private boolean open = false;
    /**
     * 是否被选中
     */
    private boolean checked = false;
    /**
     * 节点的子节点
     */
    private List<DhtmlxTree> item = new ArrayList<DhtmlxTree>();

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getpId() {
        return pId;
    }

    public void setpId(String pId) {
        this.pId = pId;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public boolean isOpen() {
        return open;
    }

    public void setOpen(boolean open) {
        this.open = open;
    }

    public List<DhtmlxTree> getItem() {
        return item;
    }

    public void setItem(List<DhtmlxTree> item) {
        this.item = item;
    }

    public boolean isChecked() {
        return checked;
    }

    public void setChecked(boolean checked) {
        this.checked = checked;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
